#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<memory>
using namespace std;
class Delete
{
public:
	void operator()(int* ptr)
	{
		delete ptr;
	}
};
int main()
{
	unique_ptr<int[],Delete> p1(new int[5]{1,2,3,4,5});
	shared_ptr<int>p2(new int(2), [](int* ptr) {delete ptr; });
	cout << *p2;
	return 0;
}